/**
 * @author casazaft
 */
Package("j2j.dom").Class("Query", {
    Query: function(str){
        str = "" + str;
        var fn = this._builder.cache.retrieval(str);
        if (!fn) {
            fn = this._builder.compile(str);
            if (!fn) 
                throw Error('selector is no support');
            this._builder.cache.store(str, fn);
        }
        this.exec = function(root){
            var result = fn.apply(this, arguments);
            return result;
        };
    },
    Prototype: {
        _builder: j2j.dom.QueryBuilder.getInstance()
    
    
    
    }

});




